Skip to content

kubernetes_cluster: sync methods wrap async counterparts#6751

Closed
ashishsuneja wants to merge 2 commits into
GoogleCloudPlatform:masterfrom
ashishsuneja:mgmt_plane_sync_wraps_async
Closed

kubernetes_cluster: sync methods wrap async counterparts#6751
ashishsuneja wants to merge 2 commits into
GoogleCloudPlatform:masterfrom
ashishsuneja:mgmt_plane_sync_wraps_async

Conversation

@ashishsuneja

Copy link
Copy Markdown
Collaborator

Summary
CreateNodePool, DeleteNodePool, UpgradeNodePool, UpdateCluster now
call *Async + WaitForOperation instead of raising NotImplementedError.
Providers only need to implement the *Async methods.

Also adds try/except in _PostCreate for Python 3.14 pickling issue
with event poller.

How tested

  • 4/4 sync wrapper tests passing
  • pyink + lint-diffs clean

Ashish Suneja added 2 commits June 5, 2026 14:11
…methods

kubernetes_management_benchmark.py:
- Full implementation of Scenarios A, B, C on top of Zach's skeleton
- _CleanStartSweep: guard clause, let it fail (no broad except)
- Run(): guard clause for version resolution
- All helpers: _RunScenarioA/B/C, _TimedAsync, _RunAsync, _OpSamples
- _Results accumulator, _AggregateSamples, _OutlierSamples

kubernetes_cluster.py:
- AddNodepool: delegates to CreateNodePool for standard clusters
- CreateNodePool/DeleteNodePool/UpgradeNodePool/UpdateCluster: sync
  wrappers calling *Async + WaitForOperation
- Abstract methods: CreateNodePoolAsync, DeleteNodePoolAsync,
  UpgradeNodePoolAsync, UpdateClusterAsync, WaitForOperation,
  ResolveNodePoolVersions, GetNodePoolNames
- BareMinor, AdjacentMinorBelow: version helper functions

Tested:
- 89 unit tests passing
- EKS end-to-end: 99 pools, 100% success all 7 scenarios
- pyink + lint-diffs clean
CreateNodePool, DeleteNodePool, UpgradeNodePool, UpdateCluster now
call their *Async counterpart + WaitForOperation instead of raising
NotImplementedError. Providers only need to implement *Async methods.

Also adds try/except in _PostCreate for Python 3.14 pickling issue
with event poller — logs warning and continues without polling rather
than crashing PKB.

Tested:
- 4/4 sync wrapper tests passing
- pyink + lint-diffs clean
@ashishsuneja ashishsuneja force-pushed the mgmt_plane_sync_wraps_async branch 2 times, most recently from c75a470 to a5cb04f Compare June 17, 2026 19:26
@ashishsuneja

Copy link
Copy Markdown
Collaborator Author

Closing — folded into #6749 per reviewer feedback. The sync-wraps-async kubernetes_cluster.py changes are now committed directly on the mgmt_plane_aks branch.

@ashishsuneja ashishsuneja deleted the mgmt_plane_sync_wraps_async branch July 1, 2026 15:57
ashishsuneja pushed a commit to ashishsuneja/PerfKitBenchmarker that referenced this pull request Jul 1, 2026
…pers

Same fix as container_service_mock.py (PR GoogleCloudPlatform#6746) -- GetNodePoolNames is
now abstract on KubernetesCluster (added by the sync-wraps-async cherry-
pick from GoogleCloudPlatform#6751) so all TestKubernetesCluster subclasses need a stub.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant